package com.ruoyi.medicine1.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.medicine1.mapper.TbMedicineMapper;
import com.ruoyi.medicine1.domain.TbMedicine;
import com.ruoyi.medicine1.service.ITbMedicineService;

/**
 * 药品基本信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-07
 */
@Service
public class TbMedicineServiceImpl implements ITbMedicineService 
{
    @Autowired
    private TbMedicineMapper tbMedicineMapper;

    /**
     * 查询药品基本信息
     * 
     * @param medicineId 药品基本信息主键
     * @return 药品基本信息
     */
    @Override
    public TbMedicine selectTbMedicineByMedicineId(Long medicineId)
    {
        return tbMedicineMapper.selectTbMedicineByMedicineId(medicineId);
    }

    /**
     * 查询药品基本信息列表
     * 
     * @param tbMedicine 药品基本信息
     * @return 药品基本信息
     */
    @Override
    public List<TbMedicine> selectTbMedicineList(TbMedicine tbMedicine)
    {
        return tbMedicineMapper.selectTbMedicineList(tbMedicine);
    }

    /**
     * 新增药品基本信息
     * 
     * @param tbMedicine 药品基本信息
     * @return 结果
     */
    @Override
    public int insertTbMedicine(TbMedicine tbMedicine)
    {
        return tbMedicineMapper.insertTbMedicine(tbMedicine);
    }

    /**
     * 修改药品基本信息
     * 
     * @param tbMedicine 药品基本信息
     * @return 结果
     */
    @Override
    public int updateTbMedicine(TbMedicine tbMedicine)
    {
        return tbMedicineMapper.updateTbMedicine(tbMedicine);
    }

    /**
     * 批量删除药品基本信息
     * 
     * @param medicineIds 需要删除的药品基本信息主键
     * @return 结果
     */
    @Override
    public int deleteTbMedicineByMedicineIds(Long[] medicineIds)
    {
        return tbMedicineMapper.deleteTbMedicineByMedicineIds(medicineIds);
    }

    /**
     * 删除药品基本信息信息
     * 
     * @param medicineId 药品基本信息主键
     * @return 结果
     */
    @Override
    public int deleteTbMedicineByMedicineId(Long medicineId)
    {
        return tbMedicineMapper.deleteTbMedicineByMedicineId(medicineId);
    }
}
